Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8787129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:48:31+00:00 2026-06-13T21:48:31+00:00

I have a problem with ZF on my new server during JS file inclusions.

  • 0

I have a problem with ZF on my new server during JS file inclusions.
Including external JS (google api) is no problem.
It seems, that zf want to load the JS files not relative.

The errormessage, displayed by FireBug in the Srcipt Tag of the html Console:

<script src="/javascript/helper.js" type="text/javascript">

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL http://project/javascript/helper.js was not found on this server.    </p>
<hr>
<address>Apache/2.2.16 (Debian) Server at domain.squeeze Port 80</address>
</body></html>
</script>

The page does not load the scripts, because it tries to get the files by the full url. This cannot work, because of the rewrite rules.
After I tried hundreds of things, I got these error at the same place:

<p>The requested URL /javascript/helper.js was not found on this server.</p>

But this is the right relative link.

My Structure:

/var/www/project/
           -->application
           -->...
           -->public
              -->javascript
                 helper.js
                 <other JS Files>
             index.php
             .htaccess

When I searched for this error, I found these possible reasons:

  1. Wrong or missing baseURL
  2. Mod rewrite not enabled
  3. Missing or bad .htaccess file in public
  4. Missing “Allow Override = All” in the vHost
  5. no leading “/” slash in the relative path of the file

None of them fits to my problem.

  1. I have no deeper “baseURL”, so my default path is “” by directing the vhost directly in my /project/public folder
  2. Mod rewrite is enabled, I can browse any page, controller, action
  3. .htaccess is default and present
  4. Allow Override is set to All, my rewrite rules work fine with the rest of the project
  5. I try it without “/” in the beginning. No effect

My layout has this inclusion methods for JS:
–> layout.phtml

$this->headScript()->appendFile('/javascript/jquery_1.6.2/jquery.js','text/javascript');
      $this->headScript()->appendFile('/javascript/jqueryui_1.8.16/jquery-ui.min.js','text/javascript');
    $this->headScript()->appendFile('/javascript/jquery.metadata.js','text/javascript');
    $this->headScript()->appendFile('/javascript/jquery.validate.js','text/javascript');
    $this->headScript()->appendFile('/javascript/jquery.fileupload.js','text/javascript');
    $this->headScript()->appendFile('/javascript/jquery.fileupload-ui.js','text/javascript');

    $this->headScript()->appendFile('/javascript/methods_de.js','text/javascript'); 
    $this->headScript()->appendFile('/javascript/helper.js','text/javascript');*/
    echo $this->headScript();

The confusing thing is, that the stylesheet inclusion works. This is the same technic

I include them by

$this->headLink()->appendStylesheet('/css/layout.css');
echo $this->headLink();

My .htaccess:

SetEnv APPLICATION_ENV development
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

I have several ZF projects running on debian lenny and they work without any problems.
Now I set up two debian squeeze and on both systems I got these problems.

If I copy the project folder to a lenny system (same vhost config), it works fine.

May be someone has a idea how I can fix this…

Thx a lot

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T21:48:32+00:00Added an answer on June 13, 2026 at 9:48 pm

    Solved by renaming the javascript folder.
    See my comments above for more details

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem with file uploading on Heroku server. (Also a hint about
I have a batch file that I am executing in a server side javascript
I have problem creating new instance of excel 2007 using VBA (from Access 2002).
I have new problem. My code: .method public static void Main() cil managed {
I have a new problem with a python script. When I try to run
I have problem with WPF - I'm quiet new in this smart technology. So
i'm new to jquery .I have problem in the following code .I saved it
I am new to vba and I have problem understanding the workbooks in vba
I'm new in codeigniter I have problem I use my OS X Lion, and
I have problem on my blog: http://osify.com while processing add new post with above

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.