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

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?

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 ?

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.