Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am trying to set up some stuff for my site and want to start using php and sql. So I have Apache and mysql installed (pre-installed from the distro). Apache works, SQL works (I have an SQL based forum running) but when I tried to write my own script and saved it with a .php extension and go to it on my site nothing happens, no sql error, no page not found error, nothing. When I save it with the extension .php4(for s#!ts and giggles) the page will load but the php scripts don't run. I am almost certain the php mod is loaded and in the php mod config I have the line "AddType application/x-httpd-php .php" Is there something I missed? Much appreciative. THANKS!
I added the lines and now the files with the .php4 dont work at all, just like the .php. So I can assume something is wrong with my script or php. I tried the script <?PHP phpinfo(); ?> and that works so I guess its my script? I will try a few things and report back later.
I've narrowed it down to when I create a variable. I can connect to the database "mysql_connect("server","username","password");" and I can select the database "mysql_select_db("whatever");" and I can do and echo out "echo "blah blah blah";" but as soon as I do a : "$whatever = mysql_query("select * from whatever")" the script wont run at all. Even early basic echos early in the script wont work.... I don't get it. Any ideas???
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.