sfareri Posted November 21, 2006 Share Posted November 21, 2006 I'm running win XP, php5, apache web server. Everytime I try and load the php page I can always see the code in my web page. any ideas? everything seems to be setup. all the errors in the apache error log show each line is in the connect() part of the script. please help!! I'm willing to send/email for help.Thanks,Sam. Quote Link to comment Share on other sites More sharing options...
printf Posted November 22, 2006 Share Posted November 22, 2006 Could you please post a link to your php info file.You can make that by putting what is below in a php file and call that from your browser.[code]<?phpinfo();?>[/code]or attach your Apache Config file if you can't even get PHP to run...printf Quote Link to comment Share on other sites More sharing options...
sfareri Posted November 22, 2006 Author Share Posted November 22, 2006 Ok, here you go.. but now... apache does not want to start when windows starts. sometimes it starts, sometimes it does not.. maybe I need to uninstall zonealarm pro? I have all the setting to let me use it.. maybe that is my issue? althought when I turn it off does the same thing.. maybe thats my sql errors? who knows. Quote Link to comment Share on other sites More sharing options...
sfareri Posted November 22, 2006 Author Share Posted November 22, 2006 file Quote Link to comment Share on other sites More sharing options...
sfareri Posted November 22, 2006 Author Share Posted November 22, 2006 will not let me post keeps crashing on me whats ur email print Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted November 22, 2006 Share Posted November 22, 2006 Put your php.ini and httpd.conf into a zip/rar file and attach it to your post (click the reply button and then expand the [b]+ Additional Options...[/b] by clicking it. Now click the browse button and find your zip/rar file and click post when done).Also by any chance do the errors look like this:[b]Fatal error: Call to undefined function mysql_connect() in [path of script here] on line [line number here][/b]if they do then you havn't enabled the MySQL extension in the php.ini, [url=http://www.phpfreaks.com/forums/index.php/topic,95378.0.html]this FAQ Thread[/url] should help you enable the extension. Also it would be a good idea to enable the [b]display_startup_errors[/b] directive in the php.ini, that way you if PHP is having trouble stating up it will display an error window on startup. Quote Link to comment Share on other sites More sharing options...
sfareri Posted November 24, 2006 Author Share Posted November 24, 2006 here u go :)[attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
sfareri Posted November 24, 2006 Author Share Posted November 24, 2006 apache error log. take a look yourself.sam.[attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted November 24, 2006 Share Posted November 24, 2006 Looking at your php.ini you have not setup the [b]extension_dir[/b] directive (located on line 520) .Change:[code]extension_dir = "./"[/code]to:[code]extension_dir = "C:/PHP/ext"[/code]Also turn on the following directives too:[b]display_errors[/b] (line 356)[b]display_startup_errors[/b] (line 361)Save php.ini and restart Apache.If PHP is having trouble loading up, they should popup when Apache is starting up.Also make sure your PHP folder is added to the Windows PATH variable too.To add the PHP folder to the Windows PATH variable, make sure you're logged in as the administrator account. Now go to Start > Control Panel > System > Advanced Tab > Environment Variables button > Environment Variables BoxScroll to the Path variable. Left click the Path variable row and click the edit button. Now press the End key on your keyboard type in the following exactly: ;C:\PHP; Click Ok on the three open dialog boxes to close them. Restart Windows. if you don't restart Windows then new Path variable wont come available until you do. Quote Link to comment Share on other sites More sharing options...
sfareri Posted November 25, 2006 Author Share Posted November 25, 2006 I also have been having trouble with APache trying to load. sometimes when I start it loads and now its not loading.. I mean service will not start.. any ideas? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted November 25, 2006 Share Posted November 25, 2006 Probably because of PHP not able to start up. Have you tried any of my suggests yet? Quote Link to comment Share on other sites More sharing options...
sfareri Posted November 25, 2006 Author Share Posted November 25, 2006 Yes, I did try that. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted November 25, 2006 Share Posted November 25, 2006 And did it solve any problems? or are you now getting problems with Apache? If you are then reset the httpd.conf by copying httpd.conf from the default folder (C:/Program Files/Apache Software Foundation/Apache2.2/conf/default/) to the conf folder overwriting the existing http.conf fileNow restart Apache. It should load up now. However without PHP support as we got rid of that.Is Apache now loaded up? Quote Link to comment Share on other sites More sharing options...
sfareri Posted November 26, 2006 Author Share Posted November 26, 2006 I have apache working again. I uninstalled everything and started over. Now, its up and running. But the sql codes are showing on the web pages. something must be wrong. I can load the php sites local and they are fine. The stupid thing keeps showing the sql code mixed in the web pages on the php files. any ideas? I did everything else I was asked to do. Now what do I do? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted November 26, 2006 Share Posted November 26, 2006 Not sure what you mean. Could you post a screenshot of what you mean, also could you post a the output you get too when you go to View > Source. Quote Link to comment Share on other sites More sharing options...
sfareri Posted November 26, 2006 Author Share Posted November 26, 2006 well the join page gives me this error for example from the main screenupdated<=$month_start){ $sql_query="update stats set month_sgnin='0', month_vis='0', updated='$now'"; sql_execute($sql_query,''); } if($stats->updated<=$week_start){ $sql_query="update stats set week_sgnin='0', week_vis='0', updated='$now'"; sql_execute($sql_query,''); } if($stats->updated<=$day_start){ $sql_query="update stats set day_sgnin='0', day_vis='0', vis='', updated='$now'"; sql_execute($sql_query,''); } $day=24*3600; if($now-$visit>=$day){ $sql_query="update stats set day_vis=day_vis+1,week_vis=week_vis+1,month_vis=month_vis+1, vis=concat(vis,'|$now')"; sql_execute($sql_query,''); SetCookie("visit",$now,time()+60*60*24,"/",$cookie_url); }//if check($mode); ?> Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted November 26, 2006 Share Posted November 26, 2006 That is PHP code. Looks like there is an unclosed quote in an echo/print statement which is showing the PHP code. Could you post the full code here for where the above code came from and I'll have a look. Dont post as text here attach it as a file attachment.To do so Click Reply button and then click the Additional Options... link. Now attach the PHP file to the post by clicking the browse button and selecting the php file from the explorer window that opens. Quote Link to comment Share on other sites More sharing options...
sfareri Posted November 26, 2006 Author Share Posted November 26, 2006 Send me your email and I'll send you the whole script.Thanks,Sam. Quote Link to comment 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.