SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 30
  1. #1
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Malaysia
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    what??? Linux not supporting PHP??

    Hey guys...

    I've managed to develop a PHP application on Win2k.. everything works out fine.... the problem is I need to port those files to a Linux system.

    Now I need to get the PHP binaries for Linux (RedHat 6.1). The problem is, when I went to the official php.net site, under "downloads", I noticed the following on the left-hand side:

    "Binaries for other systems
    We do not distribute UNIX/Linux binaries. Most Linux distributions come with PHP these days, so if you do not want to compile your own, go to your distribution's download site. For Mac OS X binaries, go to this page, for RISC OS source and binaries, visit this site "

    Why can't I find a Linux binary here... they all seem to be for Windows. My colleague who runs the Linux machine tells me she's installed some PHP version, and when she tries to load the script, via IE, the source code comes up.

    Any ideas on this? Sys. specs follow:

    O/S: Linux RedHat 6.1
    W/S: Apache for Linux 1.3.20
    mySQL: mySQL for Linux


    If I am right and php.net does not support PHP for Linux, then where can I find the binary?

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Compile the thing yourself, it is really easy to do, the docs spell it out for you. Furthermore a binary would limit you to whatever features the binary was compiled with. Why limit yourself, compile it yuourself and add the stuff you need and want.

    There is more to just installing it to make Apache parse your php scripts, you need to set some stuff in the httpd.conf, again the docs spell it out for you.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    SitePoint Zealot
    Join Date
    Aug 2001
    Location
    North Carolina
    Posts
    153
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I agree, download and compile it yourself.

    If your friend built/installed PHP already, you just have a server problem. This particular type of problem should be in the FAQs for PHP or apache.

    What it means is apache is not recognizing that your .php files are supposed to be passed to the php binary for processing. Just guessing, I'd turn to httpd.conf as the culprit.

    On Compiled/Non-compiled versions:
    Most people can not afford to own Mickey$oft or Borland or other compilers that run under Windoze. So for these people source code is useless. Fortunately gcc is freely available for most *nix platforms, allowing you to tweak options, code, and setup as you please.
    Andrew Thompson
    VPHost.com, part of the Untapped Resources Network.

  4. #4
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Malaysia
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hm... okays.. after my original post, I managed to compile the code... but during the final step, which goes like "make install".... i get an error message like "exit error 1" on the final line.

    However, I continued with trying to test a simple script. I parsed today.php that contained the following:

    PHP Code:
    <HTML>
    <HEAD>

    <TITLE>
    Today's Date
    </TITLE>

    </HEAD>

    <BODY>
    <P>
    Today's Date (according to this Web server) is
    <?php
    echo( date("l, F dS Y.") );
    ?>
    </BODY>

    </HTML>
    The output was "Today's Date (according to this Web server) is" with no date displayed.

    I *think* the PHP files should be working now.. but why isn't the date displayed?

  5. #5
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't think so I think if you view the source of that file you'll see the php code still in there, show us what you used in your configure statment
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  6. #6
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Malaysia
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    aargh crap....

    The View Source shows the source code in full, inclusive of PHP code. It's not parsing it then....

    I'm sorry.. show you a configure statement? Umm.. I'm not very familiar with non-Windows machines (this particular problem with the date not displayed was present on both a Unix and Linux machine where my colleague set up PHP and Apache).

    What exactly do you mean by "show you the configure statement"? Is there a command to run to display those statements?

    FYI, am installing PHP 4.0 based on the following article:

    http://hotwired.lycos.com/webmonkey/...tw=programming

  7. #7
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I thought you just said you had compiled php on Linux, under that assumption I asked what your configure line looked like? What did you run before make install, make, right? Then before that you should have run ./configure --enable-track-vars --with-mysql and various other configuration options. What did that look like?
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  8. #8
    SitePoint Zealot
    Join Date
    Aug 2001
    Location
    North Carolina
    Posts
    153
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ripped from a post by Chicken on WHT:
    Code:
    AddType application/x-httpd-php .php4
    AddType application/x-httpd-php .php
    See if you have lines similar to this in your linux boxes httpd.conf
    Andrew Thompson
    VPHost.com, part of the Untapped Resources Network.

  9. #9
    Database Jedi MattR's Avatar
    Join Date
    Jan 2001
    Location
    buried in the database shell (Washington, DC)
    Posts
    1,107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you have PHP compiled and loaded correctly into Apache then edit your httpd.conf file and make sure you see:
    DirectoryIndex index.php index.html

    and

    AddType application/x-httpd-php .php

    that will tell apache to look for index.php as your directory index page and then to parse .php files with PHP (instead of nothing or worse; perl!)

  10. #10
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hm... okays.. after my original post, I managed to compile the code... but during the final step, which goes like "make install".... i get an error message like "exit error 1" on the final line.
    Makes me think it did not go as planned and php was not installed. Is the libphp4.so in the apache/libexec folder? I don't think it got that far. Thats why I keep asking what he used in his configure line. Are you doing this as root?
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  11. #11
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Malaysia
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by freddydoesphp
    I thought you just said you had compiled php on Linux, under that assumption I asked what your configure line looked like? What did you run before make install, make, right? Then before that you should have run ./configure --enable-track-vars --with-mysql and various other configuration options. What did that look like?
    Yes... absolutely correct. I ran the codes by the book, just like the website http://hotwired.lycos.com/webmonkey...?tw=programming says.


    During that final step, the ./configure <a whole long list of paths>, the system displays:

    checking bla bla bla....... (yes)
    checking bla bla bla bla...... (no)......

    and so on. This takes about 10 minutes, and towards the end when it starts to check "system module" and so on.. I get an error:

    configure error. cannot find header files
    under /usr/<long pathname here>/mysql

    Then it stops there. I think the problem's with mySQL now? I have it installed already.. but it was there from an earlier version (not sure which one). Sorry, Freddydoesphp, this all happens on an HP Unix machine. Please disregard any prior mention of Linux so I don't confuse anyone..

    Any new ideas?

  12. #12
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Malaysia
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Latest update

    My colleague has just informed me that she removed some option from the ./configure line that references mySQL... now PHP completes the install.... with a "Thank you for using PHP".

    However.. during the "make" command.. it gives me the same ol' "exit error 1" during the first few lines.

    I am planning to remove the current mySQL version, and then reinstall it and reconfig. PHP 4.

    I went to www.mysql.com and tried to look for a pre-made binary.. couldn't find one for Unix? Do I do like PHP, and compile it myself?
    Last edited by infinitium; Aug 9, 2001 at 00:58.

  13. #13
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes but before you do that, you should be able to salvage your current situation. Can you pinpoint exactly where the error is? And what line it is breaking on? Look for errors in the compilation process. Also if you remove the --with-mysql from the configure line your php won't have support for mysql. Try changing the path around that you specified for mysql, tyr everything you did but take the /mysql part off the end. And most importantly try and figure why you are getting the error.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  14. #14
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Malaysia
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK.. I haven't uninstalled mySQL yet.

    When I type:

    ./configure <long list of paths but no reference to mySQL>

    the config. process runs OK.. and completes. When I next type in:

    make

    That runs too.. up to a point it displays the last line and this error:

    TSRM/libtsrm.la -lcrypt -lm
    collect2 -unable to open dynamic dependency' static branch'

    *** error exit code 1

    I suspect the problem now is with TSRM.. but I don't get it. Sometimes it will display an error related to mySQL.. at others it will display this.... sigh. My colleague mentions TSRM, whatever that is, is working fine.

    Any other ideas?

  15. #15
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What are the options you listed in your configure statement. Please do not respond with the following:

    ./configure <long list of paths but no reference to mySQL>
    as we need to see the options you used in order to help you out, I suspect it has to do with some crypt library, so could you please list out the options you used. The mysql error was probably because it couldn't find the directory. You might need try one path up from where you have been. For instance if you were trying
    Code:
    --with-mysql=/usr/local/mysql
    You may want to try this.

    Code:
    --with-mysql=/usr/local
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  16. #16
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Um, I have lots of experience at stuffing up the compiling of PHP

    I think that if you tried to compile and it failed, then before you try to compile again you should

    a) rm configure.cache

    or

    b) I think you need to do this
    ./configure ... configure options here...
    make clean
    make
    make install

    or something like that. One of the readme files should explain it more.
    Last edited by freakysid; Aug 9, 2001 at 21:26.

  17. #17
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Malaysia
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey guys....

    OK.. here are the commands that I input. Both give me the same problematic error message.

    Try #1:
    phpdir>./configure --with-mysql=/usr/local/mysql/bin/mysql --with-apxs=/stor/www/server/apache_1.3.9/bin/apxs

    Try #2:
    phpdir>./configure --with-mysql=/usr/local/mysql/ --with-apxs=/stor/www/server/apache_1.3.9/bin/apxs


    Both configure OK. When I hit make, this error appears:

    Error (I just took the last few lines):
    Reference from: /usr/local/mysql//lib/libmysqlclient.a(strto.o)(0x400)
    /bin/ld: Data Linkage Table (+z) overflow in file /usr/local/mysql//lib/libmysqlclient.a(strto.o) - use +Z option to recompile
    Reference from: /usr/local/mysql//lib/libmysqlclient.a(strto.o)(0x414)
    /bin/ld: Invalid fixups exist
    collect2: ld returned 1 exit status
    *** Error exit code 1

    Stop.
    *** Error exit code 1


    Sigh. Am on my way to try your method, FreakySid

  18. #18
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes make sure to rm the config.cache file and make clean on every try. Again try changing mysql to --with-mysql=/usr/local
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  19. #19
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Malaysia
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by freddydoesphp
    Yes make sure to rm the config.cache file and make clean on every try. Again try changing mysql to --with-mysql=/usr/local
    Is there a doc. guide available to do this? Am checking the php central for more info on this command....

  20. #20
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, its just been my experience with a couple of instances where php would not compile, and making it /usr/local worked, so I though you could give it a try, its not going to hurt anything.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  21. #21
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Malaysia
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by freakysid


    b) I think you need to do this
    ./configure ... configure options here...
    make clean
    make
    make install

    or something like that. One of the readme files should explain it more.

    Um... question. Do I run ALL the make commands in that sequence? Or choose/try only one.....

  22. #22
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Malaysia
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ignore that last post.

    OK.. here's what happened...

    1) Ran config... no problems.

    2) Ran make clean.. no problems.

    3) Ran make.... problem. Same error.. the exit 1 error.

    Aaaargh... any new ideas?

  23. #23
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Malaysia
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    tried a few other tricks over the weekend.. but still gives me the darn error...

  24. #24
    SitePoint Wizard silver trophy Karl's Avatar
    Join Date
    Jul 1999
    Location
    Derbyshire, UK
    Posts
    4,411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Instead of having --with-mysql=/usr/local/ or whatever path just use:

    --with-mysql in it's place, then try running, make, make install.
    Karl Austin :: Profile :: KDA Web Services Ltd.
    Business Web Hosting :: Managed Dedicated Hosting
    Call 0800 542 9764 today and ask how we can help your business grow.

  25. #25
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Another suggestion. Go to www.nusphere.com and download the Apache/PHP/Perl/MySQL bundle which has a simple web page interface for installing them all.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •