jasonc Posted August 5, 2009 Share Posted August 5, 2009 i have only done this once before and this was like a few years ago but today i am not getting very far.. i wish to set up my pc to work as though it is a unix linux server but having problems. i have got the installer from php.net and installed it. and added in the location of my webfolder. but when i view my pages the php is not being procesed. i have checked the manual and it says something about Windows extensions but i can not figure this out, and dont remember it last time. what should i be doing to get this to work correctly. i wish to have the php work and also mysql to work too please advise the correct way to do this. i did not get to setup mysql last time i done this so any help on this would be great. yes there is a manual but i can not get my head around what i should be looking at to get this working right. Quote Link to comment https://forums.phpfreaks.com/topic/168911-solved-setting-pc-to-work-like-a-server-problems/ Share on other sites More sharing options...
tobimichigan Posted August 5, 2009 Share Posted August 5, 2009 Why not just save urself the stress and use windows or just linux? Quote Link to comment https://forums.phpfreaks.com/topic/168911-solved-setting-pc-to-work-like-a-server-problems/#findComment-891157 Share on other sites More sharing options...
aschk Posted August 5, 2009 Share Posted August 5, 2009 You need to make sure the php module is loaded by apache (assuming you're using apache as your web server). Quote Link to comment https://forums.phpfreaks.com/topic/168911-solved-setting-pc-to-work-like-a-server-problems/#findComment-891158 Share on other sites More sharing options...
jasonc Posted August 5, 2009 Author Share Posted August 5, 2009 You need to make sure the php module is loaded by apache (assuming you're using apache as your web server). i used the following instaler... php-5.3.0-Win32-VC9-x86.msi ? now i am lost, i thought when i first done this all i can remember is runing an einstaler and that was it apache ? i have created the folder for my files to go in and viewed the complete folder location to view the page... file:///C:/apache/htdocs/www.mysite.com but the php is not processing at all Quote Link to comment https://forums.phpfreaks.com/topic/168911-solved-setting-pc-to-work-like-a-server-problems/#findComment-891180 Share on other sites More sharing options...
trq Posted August 5, 2009 Share Posted August 5, 2009 Firstly, the php-5.3.0-Win32-VC9-x86.msi is an installing for windows. You said you wanted to setup a unix / linux like server, what are you using, Linux or Windows? Secondly, php won't serve web pages by itself, you need a web server installed, have you done this and what server have you installed? Thirdly, this topic belongs in PHP Installation Help as it has nothing to do with programing php. Quote Link to comment https://forums.phpfreaks.com/topic/168911-solved-setting-pc-to-work-like-a-server-problems/#findComment-891196 Share on other sites More sharing options...
jasonc Posted August 5, 2009 Author Share Posted August 5, 2009 sorry for posting in the wrong forum i have a windows xp pc and wish to install linux same as my server i have not installed a web server? Quote Link to comment https://forums.phpfreaks.com/topic/168911-solved-setting-pc-to-work-like-a-server-problems/#findComment-891210 Share on other sites More sharing options...
trq Posted August 5, 2009 Share Posted August 5, 2009 Linux is an operating system so if you install it you wont be running windows anymore. I'm not sure that is what you really want. You just want to run a webserver on your current OS (windows) ? Quote Link to comment https://forums.phpfreaks.com/topic/168911-solved-setting-pc-to-work-like-a-server-problems/#findComment-891212 Share on other sites More sharing options...
TeNDoLLA Posted August 5, 2009 Share Posted August 5, 2009 Probably the easiest and best way for you is to install WAMP on windows. That includes apache (web server), PHP and MySQL all in one package. http://www.wampserver.com/en/ Quote Link to comment https://forums.phpfreaks.com/topic/168911-solved-setting-pc-to-work-like-a-server-problems/#findComment-891215 Share on other sites More sharing options...
jasonc Posted August 5, 2009 Author Share Posted August 5, 2009 i have instaled this as requested and i have the same problem as with using the other download i got from php.net. the php is not procesed. there has to be something else i am missing here.? Quote Link to comment https://forums.phpfreaks.com/topic/168911-solved-setting-pc-to-work-like-a-server-problems/#findComment-891230 Share on other sites More sharing options...
trq Posted August 5, 2009 Share Posted August 5, 2009 What url are you using to access the script that doesn't work? Quote Link to comment https://forums.phpfreaks.com/topic/168911-solved-setting-pc-to-work-like-a-server-problems/#findComment-891231 Share on other sites More sharing options...
jasonc Posted August 5, 2009 Author Share Posted August 5, 2009 http://localhost/www.mysite.com/ this also shows in the 'your projects' of the root view http://localhost where it shows the phpmyadmin link and the installed Extensions, having said that i just looked and there is nothing to say that PHP is instaled but the root runs ok and this is PHP ! http://localhost/index.php Quote Link to comment https://forums.phpfreaks.com/topic/168911-solved-setting-pc-to-work-like-a-server-problems/#findComment-891244 Share on other sites More sharing options...
trq Posted August 5, 2009 Share Posted August 5, 2009 Are you saying that http://localhost/index.php works? Quote Link to comment https://forums.phpfreaks.com/topic/168911-solved-setting-pc-to-work-like-a-server-problems/#findComment-891245 Share on other sites More sharing options...
jasonc Posted August 5, 2009 Author Share Posted August 5, 2009 yes this is the default page for the pc's server Quote Link to comment https://forums.phpfreaks.com/topic/168911-solved-setting-pc-to-work-like-a-server-problems/#findComment-891251 Share on other sites More sharing options...
trq Posted August 5, 2009 Share Posted August 5, 2009 Good, so your problem is solved then. Theres a solved button in the bottom left corner. Quote Link to comment https://forums.phpfreaks.com/topic/168911-solved-setting-pc-to-work-like-a-server-problems/#findComment-891253 Share on other sites More sharing options...
jasonc Posted August 5, 2009 Author Share Posted August 5, 2009 no problem not solved... !! i still have the http://localhost/www.mysite.com/ showing the php code and not having it processed. Quote Link to comment https://forums.phpfreaks.com/topic/168911-solved-setting-pc-to-work-like-a-server-problems/#findComment-891255 Share on other sites More sharing options...
PFMaBiSmAd Posted August 5, 2009 Share Posted August 5, 2009 Post the code you are trying, showing the opening php tag you are using in the file. Quote Link to comment https://forums.phpfreaks.com/topic/168911-solved-setting-pc-to-work-like-a-server-problems/#findComment-891256 Share on other sites More sharing options...
jasonc Posted August 5, 2009 Author Share Posted August 5, 2009 example.... <? echo("hello"); ?> ok i have just tried to use <?php... and this works now. how do i change WAMP to accept <? as wel las <?php as my page do not all have <?php at the start! there are way to many to ater them now. Quote Link to comment https://forums.phpfreaks.com/topic/168911-solved-setting-pc-to-work-like-a-server-problems/#findComment-891263 Share on other sites More sharing options...
trq Posted August 5, 2009 Share Posted August 5, 2009 Your better off sticking with <?php tags for portabilities sake but if you must, the setting is within your php.ini file. Quote Link to comment https://forums.phpfreaks.com/topic/168911-solved-setting-pc-to-work-like-a-server-problems/#findComment-891265 Share on other sites More sharing options...
jasonc Posted August 5, 2009 Author Share Posted August 5, 2009 what setting is that ? Quote Link to comment https://forums.phpfreaks.com/topic/168911-solved-setting-pc-to-work-like-a-server-problems/#findComment-891266 Share on other sites More sharing options...
trq Posted August 5, 2009 Share Posted August 5, 2009 Have a look, its well documented. Get to know this file. Funnily enough however its called short_open_tag. Quote Link to comment https://forums.phpfreaks.com/topic/168911-solved-setting-pc-to-work-like-a-server-problems/#findComment-891269 Share on other sites More sharing options...
jasonc Posted August 5, 2009 Author Share Posted August 5, 2009 ok all seems to be working on that side of things the only problem i am facing is now the mysql. i do not know how i set up the users for the databases? Quote Link to comment https://forums.phpfreaks.com/topic/168911-solved-setting-pc-to-work-like-a-server-problems/#findComment-891289 Share on other sites More sharing options...
jasonc Posted August 5, 2009 Author Share Posted August 5, 2009 or it could be that it is not adding in the other files which i have added using the include(); Quote Link to comment https://forums.phpfreaks.com/topic/168911-solved-setting-pc-to-work-like-a-server-problems/#findComment-891290 Share on other sites More sharing options...
jasonc Posted August 5, 2009 Author Share Posted August 5, 2009 ok restarted the pc and started all services and even checked that apache had the include modual set and still not working. just a thought should the include be in its own line. <? include("file.php"); ?> or can i use it like.. <? include("file.php"); ?> i would have thought both ways work also i have changed the settings in the php menu of WAMP to not show the php code (expose php) but still the php code shows in the source code when i view it to see if it included the other files in the page i have restarted the pc again and started all services and viewed my page and the include is still not working. all the php coding is shown in the source code? even though i have changed the setting in the php settings to not show php, expose php also <?=$myvars;?> does not work either Quote Link to comment https://forums.phpfreaks.com/topic/168911-solved-setting-pc-to-work-like-a-server-problems/#findComment-891312 Share on other sites More sharing options...
PFMaBiSmAd Posted August 5, 2009 Share Posted August 5, 2009 Short open tags are not enabled. The php.ini that you are changing is probably not the one that php is using or the syntax you used to turn on short open tags is not correct. Quote Link to comment https://forums.phpfreaks.com/topic/168911-solved-setting-pc-to-work-like-a-server-problems/#findComment-891314 Share on other sites More sharing options...
jasonc Posted August 5, 2009 Author Share Posted August 5, 2009 i changed the settingusing the WAMP menu, i clicked the icon near the clock and selected php > php settings > short open tag has a tick beside it now restarted my pc and started all services and viewed the page, still al but the include are working Quote Link to comment https://forums.phpfreaks.com/topic/168911-solved-setting-pc-to-work-like-a-server-problems/#findComment-891317 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.