Jump to content

warnings ( PHP_DIR ) while loading a php site on WAMP


-7C-

Recommended Posts

Hi,

I am a novice to PHP and WAMP but have managed to get the icon green and WAMP services running successfully ( as I understand ). The WAMP page loads fine on localhost.

 

I have made site in local host as C:\wamp\www\main-folder\sub-folder\index.php

but when I hit this URL, I get these errors.

 

Basically what I am trying to do is setup this PHP site on my local pas so that I can access its DESIGN view and edit the CSS, HTML and JS of it WITHOUT touching its PHP tagged code at all.

 

Please help.

 

( ! ) Warning: constant() [<a href='function.constant'>function.constant</a>]: Couldn't find constant PHP_DIR in C:\wamp\www\main-folder\sub-folder\index.php on line 10 Call Stack # Time Memory Function Location 1 0.0005 679968 {main}( ) ..\index.php:0 2 0.0005 680096 constant ( ) ..\index.php:10 
( ! ) Warning: chdir() [<a href='function.chdir'>function.chdir</a>]: Invalid argument (errno 22) in C:\wamp\www\main-folder\sub-folder\index.php on line 10 Call Stack # Time Memory Function Location 1 0.0005 679968 {main}( ) ..\index.php:0 2 0.0008 680320 chdir ( ) ..\index.php:10 Fatal Runtime Error.

 

Thanks

Link to comment
Share on other sites

did you read the error messages and look at the relevant code and try to figure out why the errors are occurring and if you want us to look at your your code to try and figure out what is causing the errors, wouldn't it be helpful if you posted the relevant code?

 

the first error is because your code is trying to reference a defined constant that doesn't exist. the second error is probably due to the first error.

 

where in your code are you defining the constant PHP_DIR at?

Link to comment
Share on other sites

Hi All,

Thanks for your help.

I was trying to put in a code link but the post didn't allow me to edit it.  Here is the file

 

http://pastebin.com/wvuUY6bn

 

structure is like there are many files in the root folder with index.php , and some folders with other php files where in 1 folder the header.php, and nav.php, and footer.php is stored, are those commands referring these by changing folders ?

Edited by -7C-
Link to comment
Share on other sites

Hi mac_gyver , yes its actually a PTC script ( clix script ) from IncentiveScripts,I have already designed the new layout, now wanted to code the layout. Am I doing something wrong ? I have coded a plain HTML for the same, and was about to copy the html/css changes in the php/css of the site.

 

Please advice.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.