![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| OK so I'm new at this. (And Linux) I have Redhat 9 running and have selected all associated PHP, MySQL and Apache packages for inclusion on my PC. I am working through "Sam's teach yourself" for PHP. Stupidly, I believed that this would allow me to enter a simple <?php print "test text" ?> statement into a text doc, save it as a .php file and reopen using mozilla to see "test text" displayed in the browser..... Wrong. "Sams" discusses the installation procedures from a tar/compile perspective then goes on to discuss some configuration considerations in the areas of httpd.conf modifications and php.ini modifications. Also some checks to see that apache is setup to use php as a module. IE httpd -l reveals mod_so.c is included and libphp4.so IS in the usr/lib/httpd/modules directory. Basically everything the guide suggests checks out or has been applied and the services restarted. I have also included Addtype application/x-httpd etc etc statements to ensure appropriate associations What I can't check (cos I don't now how) is what .configure options would have been applied when thes apps were installed via RPM. Is there any way I can tell? Or change them once its installed? How can I tell which versions of the packages came with Redhat 9? Also I am wanting to know whether or not I can simply go through the process of deselecting the packages is Redhat's package manager then download and install from tar files and expect that this will work smoothly. Or can I just install the d'loaded items without uninstalling? So you know, I'm not wanting to know the murky depths of Linux, it annoys me. I just want to setup this up so I can start learning how to develop in PHP with MySQL as a back end. Regards Mr.Smith | |||
|
| Advertisements |
| | #2 | ||
| Mr.Smith wrote: > Stupidly, I believed that this would allow me to enter a simple <?php print > "test text" ?> statement into a text doc, save it as a .php file and reopen > using mozilla to see "test text" displayed in the browser..... Wrong. What happens? Do you get an error msg, og is the text presented to your browser without parsing/processing? > What I can't check (cos I don't now how) is what .configure options would > have been applied when thes apps were installed via RPM. Is there any way I > can tell? Well, once you get your server to parse your .php files (which is the first thing you should concrentrate on), you can simply type this into a ..php file and view it in your browser: <?php phpinfo(); ?> Towards the top of your page, you should see the configure command used. My installation says: './configure' '--enable-calendar' '--with-mysql=/usr/local/mysql' '--with-apxs2=/usr/local/apache/bin/apxs' (...) Or change them once its installed? How can I tell which versions > of the packages came with Redhat 9? Also I am wanting to know whether or > not I can simply go through the process of deselecting the packages is > Redhat's package manager then download and install from tar files and expect > that this will work smoothly. Or can I just install the d'loaded items > without uninstalling? Personally, I think RedHat is way too slow in providing RPMs for PHP. Add to this that you can't really configure your installations when using RPM, I prefer installing and configuring software myself. In PHP this take virtually no time at all: - Download the (latest) PHP release - a .tar.gz file - Unpack this, using the command "tar zxvf <name-of-file>.tar.gz - Change into the directory created with the previous command (php-x-x-x/) - Type "./configure " followed by whatever add-ons you want to include. Or simply just type "./configure" to make it work. - Type "make" - Type "make install" (you'll probably need to be root to do this) > So you know, I'm not wanting to know the murky depths of Linux, it annoys > me. I just want to setup this up so I can start learning how to develop in > PHP with MySQL as a back end. Sure. However, once you have done this once, you can do the exact same thing with Apache, or any other piece of software. IMHO, this is both faster and easier than any setup.exe file on Windows, or RPM in Linux. And you'll get help whenever you're stuck. In places like this. Good luck! -- Marius | |||
|
| | #3 | ||
| "Mr.Smith" <mr.smith@Large> wrote in news:nS%Ta.13428$OM3.8215@news-server.bigpond.net.au: > Stupidly, I believed that this would allow me to enter a simple <?php > print "test text" ?> statement into a text doc, save it as a .php > file and reopen using mozilla to see "test text" displayed in the > browser..... Wrong. One thing: are you accessing the script directly from the filesystem, or from the server (http://localhost/myscript.php)? KAH | |||
|
| | #4 | ||
| Marius Mathiesen <marius_doesnt_read_this@hotmail.com> wrote in news:1059125194.950380@makrell.interpost.no: > Well, once you get your server to parse your .php files (which is the > first thing you should concrentrate on), you can simply type this into > a .php file and view it in your browser: > <?php > phpinfo(); > ?> You don't need more than PHP itself being properly installed, as the developers were clever enough to include the -i argument to commandline PHP. It outputs the same as phpinfo(). Just do: php -i > phpinfo.html and open phpinfo.html in your browser. > Personally, I think RedHat is way too slow in providing RPMs for PHP. > Add to this that you can't really configure your installations when > using RPM, I prefer installing and configuring software myself. In PHP > this take virtually no time at all: I strongly agree, it's much better to do it all on your own. Just yesterday I had a struggle trying to upgrade someone's PHP version. Because of the inflexibility of RPMs I had to recompile Apache as well. KAH | |||
|
| | #5 | ||
| "KAH" <kah@kahnews.cjb.net> wrote in message news:Xns93C38C7C8F730kahatkahnewsdotcjbdo@193.213. 112.21... > "Mr.Smith" <mr.smith@Large> wrote in > news:nS%Ta.13428$OM3.8215@news-server.bigpond.net.au: > > > Stupidly, I believed that this would allow me to enter a simple <?php > > print "test text" ?> statement into a text doc, save it as a .php > > file and reopen using mozilla to see "test text" displayed in the > > browser..... Wrong. > > One thing: are you accessing the script directly from the filesystem, or > from the server (http://localhost/myscript.php)? > > KAH From the file system. Please understand my lack of knowledge. :o) | |||
|
| Featured Websites | ||||
|
![]() |
| Tags: following, instructions |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Avital Champion Mark 3 Installation instructions | Bart Black | Car audio | 1 | 06-18-2007 1:41 PM |
| Installation Instructions Avital Champion Mark 3 | Bart Black | Car audio | 0 | 06-18-2007 12:32 PM |
| has anyone got install instructions for a cobra 7928? | tigro5 | Car audio | 0 | 06-18-2007 12:03 PM |
| Featured Websites | ||||
|