Find the answer to your Linux question:
Results 1 to 8 of 8
I'm trying to run .php files offline as I have mine set-up online currently, but nothing seems to work. xxamp/lamp/etc won't run the .php files offline. I just can't seem ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2011
    Posts
    22

    Anyone got software I could buy for linux that will run .php files?


    I'm trying to run .php files offline as I have mine set-up online currently, but nothing seems to work. xxamp/lamp/etc won't run the .php files offline. I just can't seem to do it. I run into way too many problems such as can't find etc or whatever. None of the tutorials seem to help.

    Please don't send me a tutorial. I've tried for the last two months to run the phpinfo.php file, but I can't seem to get that to work.

    Anyone know of a good program to buy?

  2. #2
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    Location
    West Yorks
    Posts
    4,393
    I've never heard of such a program for Linux (or Windows for that matter). What distribution are you using and how did you setup the webserver?

  3. #3
    Just Joined!
    Join Date
    Sep 2011
    Posts
    22
    Quote Originally Posted by daark.child View Post
    I've never heard of such a program for Linux (or Windows for that matter). What distribution are you using and how did you setup the webserver?
    It's all in there. Ubuntu 11.04/Linux

    I for one can not seem to figure out what the problem is for this.

    I feel like my only option is to stick to online writing, but limited internet really puts me in a stalemate.

    I can't even post the link to show you what's going wrong because I don't have enough posts.

  4. $spacer_open
    $spacer_close
  5. #4
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,023
    [QUOTE=WickDaddy;861389]I can't even post the link to show you what's going wrong because I don't have enough posts.[/QUOTE

    A workaround for that... remove the https:// section of the URL
    Example: linuxforums.org/forum/

    See? Not a link
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  6. #5
    Just Joined!
    Join Date
    Sep 2011
    Posts
    22
    [QUOTE=jayd512;861390]
    Quote Originally Posted by WickDaddy View Post
    I can't even post the link to show you what's going wrong because I don't have enough posts.[/QUOTE

    A workaround for that... remove the https:// section of the URL
    Example: linuxforums.org/forum/

    See? Not a link
    thanks, sorry I just feel like completely giving up on the idea of having a localhost to play around with .php. I'm not familiar at all how to set up a server. I mean two months to set-up a server? I feel like I'm the dumbest linux user.

    linuxforums.org/forum/servers/182758-my-php-doesnt-want-work-properly-apache-mysql.html

  7. #6
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    I've tried for the last two months to run the phpinfo.php file, but I can't seem to get that to work.
    Have you tried running it from a terminal:

    echo "<?php phpinfo()?>" | php >/home/user/test-php.txt
    Replace "user" above with whatever your actual user name is and you should have a file named test-php.txt in your /home/user directory.

    Do you have the Document root set in the php.ini file the same as in the httpd.conf file?
    In /etc/httpd/httpd.conf file, doid you add/uncomment the line: Include /etc/apache2/mod_php.conf - which is at the bottom of the file.
    You also need this in httpd.conf: AddType application/x-httpd-php .php .php3 .php4 .php5
    In /etc/httpd/mod_php.conf file you need this added or uncommented: LoadModule php5_module lib/apache2/libphp5.so

    After making any changes, you need to restart apache.

  8. #7
    Just Joined!
    Join Date
    Sep 2011
    Posts
    22
    Quote Originally Posted by yancek View Post
    Have you tried running it from a terminal:



    Replace "user" above with whatever your actual user name is and you should have a file named test-php.txt in your /home/user directory.

    Do you have the Document root set in the php.ini file the same as in the httpd.conf file?
    In /etc/httpd/httpd.conf file, doid you add/uncomment the line: Include /etc/apache2/mod_php.conf - which is at the bottom of the file.
    You also need this in httpd.conf: AddType application/x-httpd-php .php .php3 .php4 .php5
    In /etc/httpd/mod_php.conf file you need this added or uncommented: LoadModule php5_module lib/apache2/libphp5.so

    After making any changes, you need to restart apache.
    No idea what any of that even means. I got it to work though.

    What I did today was found a command that restarts the server. I think every time I reboot it stops the server from running because it either doesn't have permission to run or it doesn't auto-start is what I'm thinking. I also cleared my cache.

    5-10 fresh installs of Ubuntu 11.04 and the set-up for php, apache, and sql.

    50-100 hours of time researching through Google articles and tutorials.

    10+ hours thinking I'm way over my head being new to Linux and trying to learn commands and such for installing anything.

    Figuring out that your only problem is restarting Apache = priceless

    FML

    I can't get my headphone jack to work on linux and there's no way I'm trying that. Sound is one of the hardest to get working from what I understand. (not an expert on the subject).

    Every time I was looking in the wrong area. Thanks for the help. If someone didn't post the link to the install lampp website I would of never of thought to restart the server.

    phpinfo.php file is loading now.

  9. #8
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    The command below would output the same information you would get from accessing the info.php file through a web browser if it was functioning properly. If your actual user name is wickdaddy you would run from a terminal:

    echo "<?php phpinfo()?>" | php >/home/wickdaddy/test-php.txt
    The Ubuntu Apache files should be in /etc/apache2: httpd.conf, etc.

    I also cleared my cache
    I've forgotten to do that and had problems on several occasions.

    Anytime you make changes to apache configs you need to restart apache.

    Glad you got it working.

Posting Permissions

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