Opv Posted August 31, 2006 Share Posted August 31, 2006 I just installed a web server on my home Windows XP laptop. I am just testing out the feasibility of hosting my own permanent server. I have downloaded and installed the latest version of PHP, Perl and MySql (latest as of today) and they all test and appear to be running. I have assured that my web root matches in my web server and the PHP.ini file.I have tested Perl scripts and CGI scripts and they seem to work fine. And I can create a simple test PHP document and it runs fine. PHPinfo() returns the expected results. However, I have downloaded about 8 PHP scripts (guestbooks, etc) and followed the instructions by creating a folder within my web root and then loading the install.php file in my web browser. My problem is that I can't get any of the php files to actually do anything. I open the initial install.php file and click "install" and the page just sits there. It's the same with every new php script I try to download and install. The author of one of the guestbook scripts suspects that it might be a problem with PHP not recognizing the _GET and _POST variables and referred me to a general PHP forum. Does anyone have any thoughts on what might be the problem? Quote Link to comment https://forums.phpfreaks.com/topic/19301-problem-running-php-scripts/ Share on other sites More sharing options...
redarrow Posted August 31, 2006 Share Posted August 31, 2006 can you tell me if you have tested the database as an install file only puts database information in a database then you delete it?cheers redarrow. Quote Link to comment https://forums.phpfreaks.com/topic/19301-problem-running-php-scripts/#findComment-83713 Share on other sites More sharing options...
Opv Posted August 31, 2006 Author Share Posted August 31, 2006 Bear in mind that I am new to PHP and MySql....I have tested MySql by creating a test database (simple script copied from the net) using my HTML/script editor, and it worked fine. I haven't created the databases required by the PHP programs, as I wouldn't know where to start. As best I can tell, the install.php scripts for the progrmas I have tried so far all ask for my MySql server, accessname and accesspassword, so I have presumed that they are designed to automatically create the required database. Thanks,Opv Quote Link to comment https://forums.phpfreaks.com/topic/19301-problem-running-php-scripts/#findComment-83719 Share on other sites More sharing options...
wildteen88 Posted August 31, 2006 Share Posted August 31, 2006 The install scipts should create the tables required for the PHP script to use however you will need to first create an empty database in order for these install scripts to add the required tables to the database. You can create a new database into MySQL using phpMyAdmin which is a web based MySQL database management script you can download for free from phpmyadmin.netCould you provide the names of the scripts you are trying to install. Also which version of PHP do you have installed? And how did you install it. Quote Link to comment https://forums.phpfreaks.com/topic/19301-problem-running-php-scripts/#findComment-83726 Share on other sites More sharing options...
Opv Posted August 31, 2006 Author Share Posted August 31, 2006 I installed PHP version 5.1.6 in C:\PHP and set the PATH in my environment variables to include the path to the PHP installation directory. I then edited the PHP.ini (originally the recommended version) to set the doc_root path to match my web root path in my web server (BRS Webweaver).I have downloaded the PHPJunkyard guestbook, the Vanilla guestbook, the Gbook and several others which I have since forgotten. By the way, PHPMyAdmin is also one of the programs I have downloaded but which will not get past the first screen. I experience the same problem in that program.P.S. FYI...I just created a main database and then tried to run one of the scripts but encounter the same problem. Quote Link to comment https://forums.phpfreaks.com/topic/19301-problem-running-php-scripts/#findComment-83734 Share on other sites More sharing options...
wildteen88 Posted August 31, 2006 Share Posted August 31, 2006 Do you get any errors? Also check that yoiu have error_reporting set to E_ALL and that display_errors is set to on. YOu can do this by opening the php.ini and finding the following:[code]; Print out errors (as a part of the output). For production web sites,[/code]Above that line should be the error_reporting directive. Change whats after the = sign to E_ALLNow find the following a few lines down:[code]; server, your database schema or other information.[/code]Below that line should be the display_errors directive, make sure On is stated after the equals sign.Save the php.ini if any changes where made. Now restart your server. Do you get any errors displayed?Also when you installed php did you enable the MySQL extension, as it is important you enable the this extension for any script to work if they use a MySQL database. Quote Link to comment https://forums.phpfreaks.com/topic/19301-problem-running-php-scripts/#findComment-83743 Share on other sites More sharing options...
Opv Posted September 1, 2006 Author Share Posted September 1, 2006 OK, I have made the recommended changes to the Php.ini file. The following are the extension settings:; Windows Extensions; Note that ODBC support is built in, so no dll is needed for it.; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5); extension folders as well as the separate PECL DLL download (PHP 5).; Be sure to appropriately set the extension_dir directive.;extension=php_mbstring.dll;extension=php_bz2.dll;extension=php_curl.dll;extension=php_dba.dll;extension=php_dbase.dll;extension=php_exif.dll;extension=php_fdf.dll;extension=php_filepro.dll;extension=php_gd2.dll;extension=php_gettext.dll;extension=php_ifx.dll;extension=php_imap.dll;extension=php_interbase.dll;extension=php_ldap.dll;extension=php_mcrypt.dll;extension=php_mhash.dll;extension=php_mime_magic.dll;extension=php_ming.dllextension=php_mssql.dllextension=php_msql.dllextension=php_mysql.dll;extension=php_oci8.dll;extension=php_openssl.dll;extension=php_oracle.dll;extension=php_pgsql.dll;extension=php_shmop.dll;extension=php_snmp.dll;extension=php_sockets.dll;extension=php_sqlite.dll;extension=php_sybase_ct.dll;extension=php_tidy.dll;extension=php_xmlrpc.dll;extension=php_xsl.dllI'm still experiencing the same problem after stopping and restarting my server. I don't see any errors being reported on any screen. Quote Link to comment https://forums.phpfreaks.com/topic/19301-problem-running-php-scripts/#findComment-83755 Share on other sites More sharing options...
redarrow Posted September 1, 2006 Share Posted September 1, 2006 when you open the box for apache do you see that the words mysql on the box. Quote Link to comment https://forums.phpfreaks.com/topic/19301-problem-running-php-scripts/#findComment-83759 Share on other sites More sharing options...
Opv Posted September 1, 2006 Author Share Posted September 1, 2006 I am not running Apache...I am using the BRS Webweaver server. Here are some of the log entries:HTTP Server Started - 31/Aug/2006:18:40:09127.0.0.1 - - [31/Aug/2006:18:44:38] "GET /Gbook/gbook.php HTTP/1.1" 200 1651 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"127.0.0.1 - - [31/Aug/2006:18:44:39] "GET /Gbook/style.css HTTP/1.1" 200 340 "http://localhost/Gbook/gbook.php" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"127.0.0.1 - - [31/Aug/2006:18:44:39] "GET /Gbook/images/nospam.gif HTTP/1.1" 200 4301 "http://localhost/Gbook/gbook.php" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"127.0.0.1 - - [31/Aug/2006:18:44:41] "GET /Gbook/gbook.php?a=sign HTTP/1.1" 200 1651 "http://localhost/Gbook/gbook.php" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)" Quote Link to comment https://forums.phpfreaks.com/topic/19301-problem-running-php-scripts/#findComment-83760 Share on other sites More sharing options...
wildteen88 Posted September 1, 2006 Share Posted September 1, 2006 Did you make sure display errors is enabled? Also make sure PHP is actually using the php.ini by running the phpinfo() function. Look for the Configuration File (php.ini) Path row (4th row on the page that is generated). To the right of that it should state the path of the php.ini it is using, is this the correct path to the php.ini? If php cannot find the php.ini it'll say its in C:\WINDOWS\php.iniAlso I am unsure what you mean by 'same problem'. What is the problem?To test that your GET and POST vars are running use this:[code=php:0]<?phpif(isset($_POST['submit'])){ echo "Welcome " . $_POST['name'] . "<br />\nPOST vars are working!<br />\n<br />\n"; echo "Send this data via <a href=\"?name=" . $_POST['name'] . "\">GET</a>";}elseif(isset($_GET['name'])){ echo "Welcome " . $_GET['name'] . "<br />\nGET vars are working!";}else{?><form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="Post"> Name: <input type="text" name="name" /><br /> <input type="submit" name="submit" value="POST Vars Test" /></form><?php}?>[/code]Fill in the name field, click the button does it return what you filled in? If does click the GET link. Does it return what you filled in the name form field? Quote Link to comment https://forums.phpfreaks.com/topic/19301-problem-running-php-scripts/#findComment-83761 Share on other sites More sharing options...
redarrow Posted September 1, 2006 Share Posted September 1, 2006 sorry wildteen i went to the users webserver website and heres the link the same question always comes up but becouse i got no user info for the forum i can not read the post here you go.http://www.brswebweaver.com/forums/index.php?s=6837186afe273cd808577b708677ce97&showforum=4[b] did you read this post[/b] Quote Link to comment https://forums.phpfreaks.com/topic/19301-problem-running-php-scripts/#findComment-83766 Share on other sites More sharing options...
Opv Posted September 1, 2006 Author Share Posted September 1, 2006 Yes, I changed the error reporting settings as recommended earlier. The phpinfo() returns a full page or more of info, and the php.ini path is set correctly to c:\php. As for the "same problem", as I stated in my earlier posts, all of the php scripts do nothing after I load the original page, i.e., install.php (for the guestbooks) or the index.php (as in the case of phpmyadmin.php). When I load those files, fill in the form fields, as applicable, and click on the link to proceed, the page just sits there as if I hadn't clicked on the link. Nothing happens. On that note, the test script you provided did the same thing. I type in my name and click "post vars test" and nothing happens. I don't see a get button. Quote Link to comment https://forums.phpfreaks.com/topic/19301-problem-running-php-scripts/#findComment-83767 Share on other sites More sharing options...
trq Posted September 1, 2006 Share Posted September 1, 2006 This doesn't specifically sound like a php problem to me, maybe a server issue. Any particualr reason your using this brswebweaver? I would really recomend apache for php developement and testing. Quote Link to comment https://forums.phpfreaks.com/topic/19301-problem-running-php-scripts/#findComment-83769 Share on other sites More sharing options...
Opv Posted September 1, 2006 Author Share Posted September 1, 2006 EUREKA. Thanks. I found the problem. I had already checked the BRS Webweaver site and searched the forum but failed to find the solution. It was there all the time. Thanks for helping me find it. The solution is that I had to tell my web server to point to php_cgi.exe rather than php.exe. I made that change, restarted my server and it works fine. Thanks everyone for your help.Opv Quote Link to comment https://forums.phpfreaks.com/topic/19301-problem-running-php-scripts/#findComment-83774 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.