mbdonner Posted August 10, 2007 Share Posted August 10, 2007 Hello - I am installing a polling php script and have created the mysql database, uploaded the sql.txt file to create the tables and adjusted the config.php file. So, I think I did everything right, but I get this message on the polling admin index page: Warning: file(): URL file-access is disabled in the server configuration in /home/content/m/b/d/mbdonner/html/catholic-interactive/poll/admin/functions.inc.php on line 94 Warning: file(http://www.catholic-interactive.com/poll/templates/admin_header.html): failed to open stream: no suitable wrapper could be found in /home/content/m/b/d/mbdonner/html/catholic-interactive/poll/admin/functions.inc.php on line 94 Warning: implode(): Bad arguments. in /home/content/m/b/d/mbdonner/html/catholic-interactive/poll/admin/functions.inc.php on line 94 Warning: file(): URL file-access is disabled in the server configuration in /home/content/m/b/d/mbdonner/html/catholic-interactive/poll/admin/functions.inc.php on line 94 Warning: file(http://www.catholic-interactive.com/poll/templates/admin_poll.html): failed to open stream: no suitable wrapper could be found in /home/content/m/b/d/mbdonner/html/catholic-interactive/poll/admin/functions.inc.php on line 94 Warning: implode(): Bad arguments. in /home/content/m/b/d/mbdonner/html/catholic-interactive/poll/admin/functions.inc.php on line 94 Warning: file(): URL file-access is disabled in the server configuration in /home/content/m/b/d/mbdonner/html/catholic-interactive/poll/admin/functions.inc.php on line 94 Warning: file(http://www.catholic-interactive.com/poll/templates/admin_footer.html): failed to open stream: no suitable wrapper could be found in /home/content/m/b/d/mbdonner/html/catholic-interactive/poll/admin/functions.inc.php on line 94 Warning: implode(): Bad arguments. in /home/content/m/b/d/mbdonner/html/catholic-interactive/poll/admin/functions.inc.php on line 94 Please help!!! Thanks in advance!! Quote Link to comment https://forums.phpfreaks.com/topic/64263-solved-polling-php-install-question/ Share on other sites More sharing options...
wildteen88 Posted August 10, 2007 Share Posted August 10, 2007 Due to PHP's configuration you're not allowed to use web based file paths within file, fopen etc, You'll want to change your scripts configuration so you use relative paths instead. All those errors are caused by the first error. Fix the first one and you're good to go. Quote Link to comment https://forums.phpfreaks.com/topic/64263-solved-polling-php-install-question/#findComment-320366 Share on other sites More sharing options...
mbdonner Posted August 10, 2007 Author Share Posted August 10, 2007 OK - cool - I'm not that good at this.....so I changed the web-based file path from "http://www.catholic-interactive.com/poll/templates/" to just "/home/poll/templates/" and some errors went away but many stayed on page, so now it reads: Warning: file(/home/poll/templates/admin_header.html): failed to open stream: No such file or directory in /home/content/m/b/d/mbdonner/html/catholic-interactive/poll/admin/functions.inc.php on line 94 Warning: implode(): Bad arguments. in /home/content/m/b/d/mbdonner/html/catholic-interactive/poll/admin/functions.inc.php on line 94 Warning: file(/home/poll/templates/admin_poll.html): failed to open stream: No such file or directory in /home/content/m/b/d/mbdonner/html/catholic-interactive/poll/admin/functions.inc.php on line 94 Warning: implode(): Bad arguments. in /home/content/m/b/d/mbdonner/html/catholic-interactive/poll/admin/functions.inc.php on line 94 Warning: file(/home/poll/templates/admin_footer.html): failed to open stream: No such file or directory in /home/content/m/b/d/mbdonner/html/catholic-interactive/poll/admin/functions.inc.php on line 94 Warning: implode(): Bad arguments. in /home/content/m/b/d/mbdonner/html/catholic-interactive/poll/admin/functions.inc.php on line 94 Am I using the correct relative file path? Here is a portion from the config.php file: // change to match your server's configuration define(hostname,"localhost"); // mysql server host name define(dbname,"dbnamehere"); // mysql database name define(username,"mysqlusernamehere"); // mysql user name define(password,"mysqlpasswordhere"); // mysql password // directory where templates are located (must end foward slash) define(templatedir,"/home/www/codemunkyx/www/www.free-php.net/htdocs/demo/SimplePoll/templates/"); // url to the script main directory (must end foward slash) define(simplepollurl,"http://www.free-php.net/demo/SimplePoll/"); ?> I got all the database info configured fine, but it seems like I'm not configuring the bottom part correctly. Here's is how I've got it configured (I put all the files into a folder called "poll" in the main directory): // directory where templates are located (must end foward slash) define(templatedir,"/home/poll/templates/"); // url to the script main directory (must end foward slash) define(simplepollurl,"http://www.catholic-interactive.com/poll/"); Thanks so much for your continued help - I appreciate it! Quote Link to comment https://forums.phpfreaks.com/topic/64263-solved-polling-php-install-question/#findComment-320482 Share on other sites More sharing options...
wildteen88 Posted August 10, 2007 Share Posted August 10, 2007 Try using the following define(templatedir, $_SERVER['DOCUMENT_ROOT'] . '/poll/templates/'); Quote Link to comment https://forums.phpfreaks.com/topic/64263-solved-polling-php-install-question/#findComment-320529 Share on other sites More sharing options...
mbdonner Posted August 10, 2007 Author Share Posted August 10, 2007 Hi - thanks SO MUCH for replying back again. I appreciate your help!! OK - I cut and pasted your suggestion into the config.php file, so now it looks like this: // directory where templates are located (must end foward slash) define(templatedir,, $_SERVER['DOCUMENT_ROOT'] . '/poll/templates/"); // url to the script main directory (must end foward slash) define(simplepollurl,"http://www.catholic-interactive.com/poll/"); ?> All of the prior warning messages went away, BUT, now I get this message when I pull up that same admin area page (http://www.catholic-interactive.com/poll/admin/index.php): Parse error: parse error, unexpected ',' in /home/content/m/b/d/mbdonner/html/catholic-interactive/poll/admin/config.inc.php on line 27 What do you think causes this new warning message? Thanks again! Quote Link to comment https://forums.phpfreaks.com/topic/64263-solved-polling-php-install-question/#findComment-320592 Share on other sites More sharing options...
mbdonner Posted August 10, 2007 Author Share Posted August 10, 2007 Wait - never mind - it was the extra comma (,) in there - my bad. I took that out and now it says: Parse error: parse error, unexpected $ in /home/content/m/b/d/mbdonner/html/catholic-interactive/poll/admin/config.inc.php on line 31 Then I took out the "$" and I got: Parse error: parse error, unexpected '[' in /home/content/m/b/d/mbdonner/html/catholic-interactive/poll/admin/config.inc.php on line 27 Quote Link to comment https://forums.phpfreaks.com/topic/64263-solved-polling-php-install-question/#findComment-320594 Share on other sites More sharing options...
wildteen88 Posted August 10, 2007 Share Posted August 10, 2007 post your config.inc.php here, sensor out your database credentials. Please use the code tags ( ) when you post the code. Quote Link to comment https://forums.phpfreaks.com/topic/64263-solved-polling-php-install-question/#findComment-320676 Share on other sites More sharing options...
mbdonner Posted August 11, 2007 Author Share Posted August 11, 2007 Cool - thanks! This is the original config.inc.php file from the download: <? ######################################################### # Simple Poll # ######################################################### # # # Author: CodeMunkyX # # # # This script and all included functions, images, # # and documentation are copyright 2003 # # free-php.net (http://free-php.net) unless # # otherwise stated in the module. # # # # Any copying, distribution, modification with # # intent to distribute as new code will result # # in immediate loss of your rights to use this # # program as well as possible legal action. # # # ######################################################### // change to match your server's configuration define(hostname,"localhost"); // mysql server host name define(dbname,"dbnamehere"); // mysql database name define(username,"mysqlusernamehere"); // mysql user name define(password,"mysqlpasswordhere"); // mysql password // directory where templates are located (must end foward slash) define(templatedir,"/home/www/codemunkyx/www/www.free-php.net/htdocs/demo/SimplePoll/templates/"); // url to the script main directory (must end foward slash) define(simplepollurl,"http://www.free-php.net/demo/SimplePoll/"); ?> I have configured it so it looks like this (currently): <? ######################################################### # Simple Poll # ######################################################### # # # Author: CodeMunkyX # # # # This script and all included functions, images, # # and documentation are copyright 2003 # # free-php.net (http://free-php.net) unless # # otherwise stated in the module. # # # # Any copying, distribution, modification with # # intent to distribute as new code will result # # in immediate loss of your rights to use this # # program as well as possible legal action. # # # ######################################################### // change to match your server's configuration define(hostname,"MYSERVERNAME"); // mysql server host name define(dbname,"MYDBNAME"); // mysql database name define(username,"MYUSERNAME"); // mysql user name define(password,"MYPASSWORD"); // mysql password // directory where templates are located (must end foward slash) define(templatedir,"templates/"); // url to the script main directory (must end foward slash) define(simplepollurl,"http://www.catholic-interactive.com/poll/"); ?> Let me know your thoughts - thanks so much (again)! Quote Link to comment https://forums.phpfreaks.com/topic/64263-solved-polling-php-install-question/#findComment-321238 Share on other sites More sharing options...
wildteen88 Posted August 11, 2007 Share Posted August 11, 2007 The syntax of that file is fine. Whats wrong now? Quote Link to comment https://forums.phpfreaks.com/topic/64263-solved-polling-php-install-question/#findComment-321298 Share on other sites More sharing options...
mbdonner Posted August 11, 2007 Author Share Posted August 11, 2007 Hi - http://www.catholic-interactive.com/poll/admin/index.php Here's what the page above shows: Warning: file(templates/admin_header.html): failed to open stream: No such file or directory in /home/content/m/b/d/mbdonner/html/catholic-interactive/poll/admin/functions.inc.php on line 94 Warning: implode(): Bad arguments. in /home/content/m/b/d/mbdonner/html/catholic-interactive/poll/admin/functions.inc.php on line 94 Warning: file(templates/admin_poll.html): failed to open stream: No such file or directory in /home/content/m/b/d/mbdonner/html/catholic-interactive/poll/admin/functions.inc.php on line 94 Warning: implode(): Bad arguments. in /home/content/m/b/d/mbdonner/html/catholic-interactive/poll/admin/functions.inc.php on line 94 Warning: file(templates/admin_footer.html): failed to open stream: No such file or directory in /home/content/m/b/d/mbdonner/html/catholic-interactive/poll/admin/functions.inc.php on line 94 Warning: implode(): Bad arguments. in /home/content/m/b/d/mbdonner/html/catholic-interactive/poll/admin/functions.inc.php on line 94 Thanks..... Quote Link to comment https://forums.phpfreaks.com/topic/64263-solved-polling-php-install-question/#findComment-321305 Share on other sites More sharing options...
mbdonner Posted August 12, 2007 Author Share Posted August 12, 2007 OK - I've got it resolved. The path should have been: "/home/content/m/b/d/mbdonner/html/catholic-interactive/poll/templates/" Thank you SO MUCH for your help and your time. I appreciate it! Quote Link to comment https://forums.phpfreaks.com/topic/64263-solved-polling-php-install-question/#findComment-321365 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.