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 ...
- 09-18-2011 #1Just Joined!
- Join Date
- Sep 2011
- Posts
- 18
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?
- 09-18-2011 #2
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?
- 09-18-2011 #3Just Joined!
- Join Date
- Sep 2011
- Posts
- 18
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.
- 09-18-2011 #4
[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.
- 09-18-2011 #5Just Joined!
- Join Date
- Sep 2011
- Posts
- 18
[QUOTE=jayd512;861390] 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
- 09-19-2011 #6Linux Guru
- Join Date
- Oct 2007
- Location
- Tucson AZ
- Posts
- 1,937
Have you tried running it from a terminal:I've tried for the last two months to run the phpinfo.php file, but I can't seem to get that to work.
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.echo "<?php phpinfo()?>" | php >/home/user/test-php.txt
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.
- 09-19-2011 #7Just Joined!
- Join Date
- Sep 2011
- Posts
- 18
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.
- 09-19-2011 #8Linux Guru
- Join Date
- Oct 2007
- Location
- Tucson AZ
- Posts
- 1,937
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:
The Ubuntu Apache files should be in /etc/apache2: httpd.conf, etc.echo "<?php phpinfo()?>" | php >/home/wickdaddy/test-php.txt
I've forgotten to do that and had problems on several occasions.I also cleared my cache
Anytime you make changes to apache configs you need to restart apache.
Glad you got it working.


Reply With Quote

