Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.



438 posts

Ultimate Geek


Topic # 140831 21-Feb-2014 12:25 Send private message

Hi Geekzone and thank you for reading this post,

I have develped my first website with multiple pages and many of the pages have php content embed in them.

I design and build the site using expression web 4 and during the develpment i was able to test the pages loading the php embed data in them just by adding server host number to the hyperlink
it seemed like the page went through the development server then post it the data.


Now i upload the site to my live server and my php content is not loading so i was wondering if anyone could helpme, i spent hours in Google but most people use wordpress and my host does not have any user interface setup just do everything through dreamweaver or expression web.


my local host url looks like 

localhost:25888/folder/webpage and it loads
my pages in live server are trying to connect to my localhost address but i dont know what to put as new address link?

please help me out I did google it and could no find a way to sort it out,



Kind regards,


Andrew

Create new topic
430 posts

Ultimate Geek
+1 received by user: 81


  Reply # 991758 21-Feb-2014 12:31 Send private message

Open up Notepad.

Enter the bold:

<?php
phpinfo();
?>


Save as info.php

Upload that to your web server and navigate to it to check PHP is working correctly.





430 posts

Ultimate Geek
+1 received by user: 81


  Reply # 991763 21-Feb-2014 12:36 Send private message

Sorry, I was going to mention in your previous thread to maybe avoid Expression Engine and the likes as it sounds like it has a built in web server / does a lot of stuff 'automagically' and may give you a false / confusing idea about how your app will run on a real server environment etc if you're new to PHP.

I would recommend starting with XAMPP for your local server environment and doing your coding in something simple like Notepad++, then progress to something like Netbeans.





468 posts

Ultimate Geek
+1 received by user: 83


  Reply # 991842 21-Feb-2014 14:45 Send private message

Expression engine is fine to use but you have to learn how to set up php. It sounds like you maybe using short tags and the production server doesn't have short tags turned on.




Regards
Stefan Andres Charsley

430 posts

Ultimate Geek
+1 received by user: 81


  Reply # 991844 21-Feb-2014 14:49 Send private message

*Expression Web not Expression Engine





468 posts

Ultimate Geek
+1 received by user: 83


  Reply # 991847 21-Feb-2014 14:53 Send private message

I've used expression web and its ok but its too much for designers and not for coders, so I used web matrix.




Regards
Stefan Andres Charsley



438 posts

Ultimate Geek


  Reply # 991875 21-Feb-2014 16:07 Send private message

thank you all for your replies, yes i used expression web because it seemed quit user friendly and plenty of tutorials in youtube.

what i did is 

1- created a Master page for all templates to look same
2-index page and i put buttons with links to the content pages 30 pages in fact
3- each content page i saved it as PHP as it would not let me add PHP code into HTML without changing file extension.
4- I placed a <div=id....named content etc.  <div> i made it in the master page and made it the only part of the template that can be edited.
5- in every content PHP page i placed the PHP code inside the <div> named content and wallah when i test it online it pulls data perfectly into the page. {even thought is running through localhost still pulling data from online database.
6- upload it site with filezilla via ftp and site load index.htm perfectly but content pages load without any content like if php was ignored.


sorry i write too much stuff but thanks again for you replies I will play around with it again,


Andrew

468 posts

Ultimate Geek
+1 received by user: 83


  Reply # 991876 21-Feb-2014 16:12 Send private message

GamerOC: thank you all for your replies, yes i used expression web because it seemed quit user friendly and plenty of tutorials in youtube.

what i did is 

1- created a Master page for all templates to look same
2-index page and i put buttons with links to the content pages 30 pages in fact
3- each content page i saved it as PHP as it would not let me add PHP code into HTML without changing file extension.
4- I placed a <div=id....named content etc.  <div> i made it in the master page and made it the only part of the template that can be edited.
5- in every content PHP page i placed the PHP code inside the <div> named content and wallah when i test it online it pulls data perfectly into the page. {even thought is running through localhost still pulling data from online database.
6- upload it site with filezilla via ftp and site load index.htm perfectly but content pages load without any content like if php was ignored.


sorry i write too much stuff but thanks again for you replies I will play around with it again,


Andrew


This may sound like a dumb question but a lot of people who don't know about servers seem to make this mistake:

Is php actually installed on the production server?
Does the phpinfo file like described above work?




Regards
Stefan Andres Charsley

430 posts

Ultimate Geek
+1 received by user: 81


  Reply # 991878 21-Feb-2014 16:15 Send private message

And perhaps are you able to post a copy of one of your files so we can see how you've got it setup?





19 posts

Geek


  Reply # 991879 21-Feb-2014 16:18 Send private message

My guess is you are using "absolute" URLS instead of "relative" ones. 

An example of an absolute path is <img src="http://localhost/mypic.jpg">

An example of a relative path is <img src="/mypic.jpg">

There maybe a setting in your web development suite for setting this.. alternatively there might even be an export to bla site function. You could try those out. 

And another question - is there a database for your website? 

468 posts

Ultimate Geek
+1 received by user: 83


  Reply # 991880 21-Feb-2014 16:21 Send private message

Getsited: My guess is you are using "absolute" URLS instead of "relative" ones. 

An example of an absolute path is <img src="http://localhost/mypic.jpg">

An example of a relative path is <img src="/mypic.jpg">

There maybe a setting in your web development suite for setting this.. alternatively there might even be an export to bla site function. You could try those out. 

And another question - is there a database for your website? 


One step at a time, currently we're trying to see if he's got php successfully set up




Regards
Stefan Andres Charsley

430 posts

Ultimate Geek
+1 received by user: 81


  Reply # 991883 21-Feb-2014 16:29 Send private message

GamerOC: thank you all for your replies, yes i used expression web because it seemed quit user friendly and plenty of tutorials in youtube.

what i did is 

1- created a Master page for all templates to look same
2-index page and i put buttons with links to the content pages 30 pages in fact
3- each content page i saved it as PHP as it would not let me add PHP code into HTML without changing file extension.
4- I placed a <div=id....named content etc.  <div> i made it in the master page and made it the only part of the template that can be edited.
5- in every content PHP page i placed the PHP code inside the <div> named content and wallah when i test it online it pulls data perfectly into the page. {even thought is running through localhost still pulling data from online database.
6- upload it site with filezilla via ftp and site load index.htm perfectly but content pages load without any content like if php was ignored.


sorry i write too much stuff but thanks again for you replies I will play around with it again,


Andrew


Remember PHP will only execute from within .php files.

*unless you have a non-standard server setup which you don't..





Create new topic




Twitter »
Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:




News »

Trending now »
Hot discussions in our forums right now:

Moment of Truth?
Created by BarTender, last reply by gzt on 17-Sep-2014 00:34 (247 replies)
Pages... 15 16 17


Mr. Key to extradite Kim Dotcom?
Created by TimA, last reply by dcole13 on 16-Sep-2014 12:38 (110 replies)
Pages... 6 7 8


Spark DNS Issues - Amazing - Broadband Service Alert
Created by PeteS, last reply by Demeter on 15-Sep-2014 14:13 (307 replies)
Pages... 19 20 21


hp bios update
Created by foxy38, last reply by foxy38 on 14-Sep-2014 19:08 (26 replies)
Pages... 2


Linksys EA6700 $98 at Harvey Horman
Created by macuser, last reply by macuser on 16-Sep-2014 15:18 (18 replies)
Pages... 2


Important changes to your Orcon email service ??
Created by old3eyes, last reply by Jarno on 16-Sep-2014 21:18 (17 replies)
Pages... 2


2014 Holden SS (V8) or Ford XR6-T (in-line 6 turbo)
Created by joker97, last reply by ilovemusic on 16-Sep-2014 14:34 (71 replies)
Pages... 3 4 5


Have $10,000, now what?
Created by Unregistered, last reply by loceff13 on 16-Sep-2014 19:31 (47 replies)
Pages... 2 3 4



Geekzone Live »
Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.

Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.