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.




439 posts

Ultimate Geek


# 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
563 posts

Ultimate Geek


  # 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.





563 posts

Ultimate Geek


  # 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.





 
 
 
 


597 posts

Ultimate Geek


  # 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

563 posts

Ultimate Geek


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

*Expression Web not Expression Engine





597 posts

Ultimate Geek


  # 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



439 posts

Ultimate Geek


  # 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

597 posts

Ultimate Geek


  # 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

 
 
 
 


563 posts

Ultimate Geek


  # 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?





28 posts

Geek


  # 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? 

597 posts

Ultimate Geek


  # 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

563 posts

Ultimate Geek


  # 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 and LinkedIn »



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 »

Intel expands 10th Gen Intel Core Mobile processor family
Posted 23-Aug-2019 10:22


Digital innovation drives new investment provider
Posted 23-Aug-2019 08:29


Catalyst Cloud becomes a Kubernetes Certified Service Provider (KCSP)
Posted 23-Aug-2019 08:21


New AI legaltech product launched in New Zealand
Posted 21-Aug-2019 17:01


Yubico launches first Lightning-compatible security key, the YubiKey 5Ci
Posted 21-Aug-2019 16:46


Disney+ streaming service confirmed launch in New Zealand
Posted 20-Aug-2019 09:29


Industry plan could create a billion dollar interactive games sector
Posted 19-Aug-2019 20:41


Personal cyber insurance a New Zealand first
Posted 19-Aug-2019 20:26


University of Waikato launches space for esports
Posted 19-Aug-2019 20:20


D-Link ANZ expands mydlink ecosystem with new mydlink Mini Wi-Fi Smart Plug
Posted 19-Aug-2019 20:14


Kiwi workers still falling victim to old cyber tricks
Posted 12-Aug-2019 20:47


Lightning Lab GovTech launches 2019 programme
Posted 12-Aug-2019 20:41


Epson launches portable laser projector
Posted 12-Aug-2019 20:27


Huawei launches new distributed HarmonyOS
Posted 12-Aug-2019 20:20


Lenovo introduces single-socket servers for edge and data-intensive workloads
Posted 9-Aug-2019 21:26



Geekzone Live »

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


Support Geekzone »

Our community of supporters help make Geekzone possible. Click the button below to join them.

Support Geezone on PressPatron



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.